<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="./vue.js"></script>
  <title>Document</title>
</head>
<body>
  <!-- view -->
  <div id="app">
    {{name}} 
    <input type="text" v-model="text">
    输入框的值：{{text}}
  </div>
  <script>
    // vm ： viewmodel
    let vm = new Vue({
      el:"#app",
      // model
      data() {
        return {
          name:"使用v-bind和v-on实现v-model双向绑定的效果",
          text:"这里有个子"
        }
      },
      methods: {
        inputOne(e){
            console.log(e);
            this.text=e.target.value
        }
      },  
    });
  </script>
</body>
</html>